package com.example.designpatterns.decoratorpattern;

public class Decorator extends Drink{

    private Drink obj;

    public Decorator(Drink obj) {
        this.obj = obj;
    }

    public Drink getDrink() {
        return obj;
    }

    public void setDrink(Drink obj) {
        this.obj = obj;
    }

    @Override
    public float coast() {
        return obj.coast()+super.getPrice();
    }

    @Override
    public String getDes() {
        return des + " " +super.getDes()+ " && " +obj.getDes();
    }
}
